#include "Explode.h"


Explode::Explode()
{
	m_Count = 0;
	m_gameTime = new GameTime();
	m_TimeAnimation = 0.35f;
	m_Index = 0;
}

void Explode::Init(IDImage type)
{
	m_Sprite = Source::getInstance()->getSprite(type);

	m_Count = m_Sprite->getCount();
}

void Explode::Draw(LPD3DXSPRITE SpriteHandler, D3DXVECTOR2 position, int vpx, int vpy)
{
	m_Sprite->Draw(SpriteHandler, position, D3DXVECTOR2(1.0f, 1.0f), vpx, vpy);
}

void Explode::Next()
{
	/*m_gameTime->setTime();
	if (m_gameTime->getElapsedTimePerSecond() >= m_TimeAnimation)
	{*/
		//m_gameTime->Update();
		m_Index++;

		m_Sprite->setIndex(m_Index);
	//}
}

bool Explode::NoneEffect()
{
	if (m_Index == m_Count) return true;

	return false;
}

Explode::~Explode()
{
}
